home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / bin / dh_bash-completion < prev    next >
Encoding:
Text File  |  2009-01-21  |  1.1 KB  |  58 lines

  1. #!/usr/bin/perl -w
  2.  
  3. =head1 NAME
  4.  
  5. dh_bash-completion - install bash completions for package
  6.  
  7. =cut
  8.  
  9. use strict;
  10. use Debian::Debhelper::Dh_Lib;
  11.  
  12. =head1 SYNOPSIS
  13.  
  14. B<dh_bash-completion> [S<I<debhelper options>>]
  15.  
  16. =head1 DESCRIPTION
  17.  
  18. dh_bash-completion is a debhelper program that is responsible for installing
  19. completions for bash, usable installing the "bash-completion" package.
  20.  
  21. If a file named debian/package.bash-completion exists, then it is
  22. installed into etc/bash_completion.d in the package build directory.
  23. This file is used to provide the user with proper completion for available
  24. commands.
  25.  
  26. =cut
  27.  
  28. init();
  29.  
  30. foreach my $package (@{$dh{DOPACKAGES}}) {
  31.     next if is_udeb($package);
  32.  
  33.     my $tmp = tmpdir($package);
  34.     my $bc_dir = "$tmp/etc/bash_completion.d";
  35.     my $completions = pkgfile($package,"bash-completion");
  36.  
  37.     if ($completions ne '') {
  38.         if (! -d "$bc_dir") {
  39.              doit("install", "-d", "$bc_dir");
  40.         }
  41.         doit("install", "-p", "-m644", $completions, "$bc_dir/$package");
  42.     }
  43. }
  44.  
  45. =head1 SEE ALSO
  46.  
  47. L<debhelper(1)>
  48.  
  49. This program is a part of bash-completion.
  50.  
  51. L<bash(1)>
  52.  
  53. =head1 AUTHOR
  54.  
  55. David Paleino <d.paleino@gmail.com>
  56.  
  57. =cut
  58.